package com.naiterui.ehp.bs.recommend.bean;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.Data;

/***
 * 常用处方详情
 *
 * @author yangfuya
 */
@Data
@Entity
@Table(name = "dr_common_prescription_detail")
public class CommonPrescriptionDetail implements Serializable {

    private static final long serialVersionUID = -1132738817988327016L;
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;

    /**
     * 常用处方Id
     */
    @Column(name = "common_prescription_id")
    private Long commonPrescriptionId;

    /**
     * 商品Id
     */
    @Column(name = "product_id")
    private Long productId;

    /**
     * 商品skuId
     */
    @Column(name = "sku_id")
    private Long skuId;

    /**
     * 商品名
     */
    @Column(name = "name")
    private String name;

    /**
     * 通用名
     */
    @Column(name = "common_name")
    private String commonName;

    /**
     * 商品数量
     */
    @Column(name = "quantity")
    private Integer quantity;

    /**
     * 用法用量
     */
    @Column(name = "usages")
    private String usages;

    /**
     * 备注
     */
    @Column(name = "bakup")
    private String bakup;

    /**
     * 默认用量字符串
     */
    @Column(name = "dosage_str")
    private String dosageStr;
    /**
     * 用量周期
     */
    @Column(name = "dosage_cycle")
    private Double dosageCycle;

    /**
     * 用量周期单位
     */
    @Column(name = "dosage_cycle_unit")
    private String dosageCycleUnit;

    /**
     * 用量次数
     */
    @Column(name = "dosage_count")
    private String dosageCount;

    /**
     * 每次用量
     */
    @Column(name = "each_dosage_count")
    private String eachDosageCount;

    /**
     * 每次用量单位
     */
    @Column(name = "each_dose_unit")
    private String eachDoseUnit;

    /**
     * 用药周期
     */
    @Column(name = "drug_cycle")
    private Integer drugCycle;

    /**
     * 用药周期单位
     */
    @Column(name = "drug_cycle_unit")
    private String drugCycleUnit;

    /**
     * 推荐数量单位
     */
    @Column(name = "quantity_unit")
    private String quantityUnit;

    /**
     * 服用方法
     */
    @Column(name = "usage_method")
    private String usageMethod;

    /**
     * 服用时间
     */
    @Column(name = "usage_time")
    private String usageTime;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    @Version
    private Integer version;
}